Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed CI and Rename method . #288

Merged
merged 3 commits into from
Apr 30, 2024
Merged

Fixed CI and Rename method . #288

merged 3 commits into from
Apr 30, 2024

Conversation

NMSAzulX
Copy link
Collaborator

@NMSAzulX NMSAzulX commented Apr 30, 2024

Summary by CodeRabbit

  • New Features

    • Added a new step in the workflow to build NatashaFunctionUT in Release mode without logging.
    • Introduced dynamic breakpoint debugging, reference assembly output, and hidden Release mode support in the DotNetCore.Natasha.CSharp.Compiler.
    • Enhanced compatibility and added new script templates across various components.
    • Added method GetBuildTaskString for generating build task strings in workflow configurations.
  • Enhancements

    • Updated the .NET version in GitHub Actions workflow setup for improved stability and compatibility.
    • Upgraded dependencies across multiple projects to newer versions for enhanced performance and security.
  • Bug Fixes

    • Fixed diagnostic warning bugs in the DotNetCore.Natasha library.
  • Refactor

    • Renamed methods related to method creation and delegation to more intuitive names like ToDelegate and ToAsyncDelegate.
  • Documentation

    • Updated CHANGELOG to reflect new features, enhancements, and bug fixes.

Copy link

coderabbitai bot commented Apr 30, 2024

Walkthrough

This update focuses on enhancing the DotNetCore.Natasha library by updating dependencies, refining method naming, and introducing new functionalities like dynamic debugging and metadata management. Key changes include version bumps for core components, method renaming for clarity, and the addition of new features to support modern .NET standards and improve performance.

Changes

Files Change Summary
.github/.../test.yml.template
test/.../NatashaFunctionUT.csproj
Updated .NET and package versions.
.github/.../pr_test.yml Added a new build step.
CHANGELOG.md Documented library updates and new features.
samples/.../Program.cs
src/.../StringExtension.cs
src/.../SystemDelegateExtension.cs
Updated method naming and usage.
src/.../Natasha.CSharp.Compiler.csproj Updated dependency to a newer version.
test/workflow/.../ConfigRunner.cs Added method for generating build task strings.

🐰✨
In the land of code, where the bits align,
A rabbit hopped, leaving changes behind.
DotNet gleams, now finer than before,
With methods renamed and versions soared.
Hop, skip, a commit, a push,
In the burrows of Natasha, a new dawn blush. 🌅
🐰💻


Recent Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 9373db1 and cf539ea.
Files selected for processing (9)
  • .github/NMS_TEMPLATE/test.yml.template (1 hunks)
  • .github/workflows/pr_test.yml (1 hunks)
  • CHANGELOG.md (1 hunks)
  • samples/ExtensionSample/Program.cs (1 hunks)
  • src/Natasha.CSharp/Extension/Natasha.CSharp.Extension.MethodCreator/StringExtension.cs (2 hunks)
  • src/Natasha.CSharp/Extension/Natasha.CSharp.Extension.MethodCreator/SystemDelegateExtension.cs (1 hunks)
  • src/Natasha.CSharp/Natasha.CSharp.Compiler/Natasha.CSharp.Compiler.csproj (1 hunks)
  • test/ut/NatashaFunctionUT/NatashaFunctionUT.csproj (1 hunks)
  • test/workflow/Workflow.Initialization/Core/ConfigRunner.cs (2 hunks)
Files skipped from review due to trivial changes (4)
  • .github/NMS_TEMPLATE/test.yml.template
  • src/Natasha.CSharp/Extension/Natasha.CSharp.Extension.MethodCreator/SystemDelegateExtension.cs
  • src/Natasha.CSharp/Natasha.CSharp.Compiler/Natasha.CSharp.Compiler.csproj
  • test/ut/NatashaFunctionUT/NatashaFunctionUT.csproj
Additional Context Used
LanguageTool (24)
CHANGELOG.md (24)

Near line 22: Possible spelling mistake found.
Context: .... --> ## [8.1.2.1] - 2024-05-01 ### DotNetCore.Natasha.CSharp.Compiler _ v8.1.2.1: - 保...


Near line 22: Add a space between sentences.
Context: ...[8.1.2.1] - 2024-05-01 ### DotNetCore.Natasha.CSharp.Compiler _ v8.1.2.1: - 保留热重载相关 A...


Near line 22: Possible spelling mistake found.
Context: ...] - 2024-05-01 ### DotNetCore.Natasha.CSharp.Compiler _ v8.1.2.1: - 保留热重载相关 API. - 升...


Near line 22: Add a space between sentences.
Context: ...4-05-01 ### DotNetCore.Natasha.CSharp.Compiler _ v8.1.2.1: - 保留热重载相关 API. - 升级 Roslyn ...


Near line 29: Possible spelling mistake found.
Context: ...slyn 依赖. - 修复诊断警告相关 BUG. - 修复错别字. ### DotNetCore.Natasha.CSharp.Template.Core _ v8.0.0.1...


Near line 29: Add a space between sentences.
Context: ...修复诊断警告相关 BUG. - 修复错别字. ### DotNetCore.Natasha.CSharp.Template.Core _ v8.0.0.1: - 跟随 C...


Near line 29: Possible spelling mistake found.
Context: ... BUG. - 修复错别字. ### DotNetCore.Natasha.CSharp.Template.Core _ v8.0.0.1: - 跟随 Compiler...


Near line 29: Add a space between sentences.
Context: ... 修复错别字. ### DotNetCore.Natasha.CSharp.Template.Core _ v8.0.0.1: - 跟随 Compiler 升级依赖. #...


Near line 29: Add a space between sentences.
Context: ... ### DotNetCore.Natasha.CSharp.Template.Core _ v8.0.0.1: - 跟随 Compiler 升级依赖. ### Do...


Near line 32: Possible spelling mistake found.
Context: ...re _ v8.0.0.1: - 跟随 Compiler 升级依赖. ### DotNetCore.Natasha.CSharp.Extension.Codecov _ v8.0...


Near line 32: Add a space between sentences.
Context: ....1: - 跟随 Compiler 升级依赖. ### DotNetCore.Natasha.CSharp.Extension.Codecov _ v8.0.0.1: - ...


Near line 32: Possible spelling mistake found.
Context: ... Compiler 升级依赖. ### DotNetCore.Natasha.CSharp.Extension.Codecov _ v8.0.0.1: - 跟随 Comp...


Near line 32: Add a space between sentences.
Context: ...er 升级依赖. ### DotNetCore.Natasha.CSharp.Extension.Codecov _ v8.0.0.1: - 跟随 Compiler 升级依赖....


Near line 32: Add a space between sentences.
Context: ...### DotNetCore.Natasha.CSharp.Extension.Codecov _ v8.0.0.1: - 跟随 Compiler 升级依赖. ### Do...


Near line 35: Possible spelling mistake found.
Context: ...ov _ v8.0.0.1: - 跟随 Compiler 升级依赖. ### DotNetCore.Natasha.CSharp.Extension.Ambiguity _ v8...


Near line 35: Add a space between sentences.
Context: ....1: - 跟随 Compiler 升级依赖. ### DotNetCore.Natasha.CSharp.Extension.Ambiguity _ v8.0.0.1: ...


Near line 35: Possible spelling mistake found.
Context: ... Compiler 升级依赖. ### DotNetCore.Natasha.CSharp.Extension.Ambiguity _ v8.0.0.1: - 跟随 Co...


Near line 35: Add a space between sentences.
Context: ...er 升级依赖. ### DotNetCore.Natasha.CSharp.Extension.Ambiguity _ v8.0.0.1: - 跟随 Compiler 升级依...


Near line 35: Add a space between sentences.
Context: ...### DotNetCore.Natasha.CSharp.Extension.Ambiguity _ v8.0.0.1: - 跟随 Compiler 升级依赖. ### Do...


Near line 38: Possible spelling mistake found.
Context: ...ty _ v8.0.0.1: - 跟随 Compiler 升级依赖. ### DotNetCore.Natasha.CSharp.Extension.MethodCreator ...


Near line 38: Add a space between sentences.
Context: ....1: - 跟随 Compiler 升级依赖. ### DotNetCore.Natasha.CSharp.Extension.MethodCreator _ v8.0.0...


Near line 38: Possible spelling mistake found.
Context: ... Compiler 升级依赖. ### DotNetCore.Natasha.CSharp.Extension.MethodCreator _ v8.0.0.1: - 发...


Near line 38: Add a space between sentences.
Context: ...er 升级依赖. ### DotNetCore.Natasha.CSharp.Extension.MethodCreator _ v8.0.0.1: - 发布 便捷动态方法编译...


Near line 38: Add a space between sentences.
Context: ...### DotNetCore.Natasha.CSharp.Extension.MethodCreator _ v8.0.0.1: - 发布 便捷动态方法编译模板. - 跟随其他扩展库版...

Additional comments not posted (5)
samples/ExtensionSample/Program.cs (1)

11-11: Use of the null-forgiving operator is appropriate here if ToFunc<int, int, int>() is guaranteed not to return null.

CHANGELOG.md (1)

20-40: The CHANGELOG entries correctly detail the updates and new features. Ensure all version numbers and feature descriptions are accurate.

.github/workflows/pr_test.yml (1)

23-28: Updated .NET SDK versions and added a new build step for NatashaFunctionUT. Ensure these changes are tested across all specified OS environments in the matrix.

src/Natasha.CSharp/Extension/Natasha.CSharp.Extension.MethodCreator/StringExtension.cs (1)

Line range hint 21-59: Renaming and addition of methods for creating delegates are well-implemented. Ensure all references to these methods are updated across the codebase.

Verification successful

The verification script was designed to check if any references to the old method name CreateMethod still exist in the codebase. The output of the script shows that there are zero occurrences of this method name, which suggests that all references to this method have been successfully updated to the new names as per the changes in the pull request.

Given this information, it appears that the renaming and addition of methods for creating delegates, as mentioned in the review comment, have been correctly implemented and updated across the codebase.

Conclusion

The verification confirms that the renaming and updates to the method references have been successfully implemented in the codebase. No old references remain, indicating thorough updates.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Description: Verify all references to the renamed methods are updated in the codebase.

# Test: Search for old method names to find omissions. Expect: No matches.
echo "Searching for old method names..."
ast-grep --lang csharp --pattern $'CreateMethod($_, $_)' | wc -l

Length of output: 144

test/workflow/Workflow.Initialization/Core/ConfigRunner.cs (1)

Line range hint 99-119: Addition of GetBuildTaskString and updates to configuration management methods are appropriate. Ensure these changes are thoroughly tested, especially in different CI environments.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@NMSAzulX NMSAzulX added pr_src 此次提交包含 [源码工程] 相关的改动. pr_test 此次提交包含 [测试工程] 相关的改动. pr_action 此次提交包含 [Action] 相关的改动. labels Apr 30, 2024
@NMSAzulX
Copy link
Collaborator Author

未检测到合适的 ISSUE 推荐给您。感谢您的反馈!

该条自动推荐信息来自于 nms-bot.

@NMSAzulX
Copy link
Collaborator Author

@coderabbitai review

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Comment on lines +20 to +40
## [8.1.2.1] - 2024-05-01

### DotNetCore.Natasha.CSharp.Compiler _ v8.1.2.1:
- 保留热重载相关 API.
- 升级 Roslyn 依赖.
- 修复诊断警告相关 BUG.
- 修复错别字.

### DotNetCore.Natasha.DynamicLoad.Base _ v8.0.0.0:
- INatashaDynamicLoadContextBase 接口来规范域的行为.
- INatashaDynamicLoadContextCreator 接口来规范创建域以及其他 Runtime 方法的实现.

### DotNetCore.Natasha.Domain _ v8.0.0.0:
- 优化域加载时程序集比对的逻辑.
- 相同依赖不会二次加载.
### DotNetCore.Natasha.CSharp.Template.Core _ v8.0.0.1:
- 跟随 Compiler 升级依赖.

### DotNetCore.Natasha.CSharp.Extension.Codecov _ v8.0.0.1:
- 跟随 Compiler 升级依赖.

### DotNetCore.Natasha.CSharp.Compiler.Domain _ v8.0.0.0:
- 实现 `DotNetCore.Natasha.DynamicLoad.Base` 接口,支持 Natasha 域操作.
### DotNetCore.Natasha.CSharp.Extension.Ambiguity _ v8.0.0.1:
- 跟随 Compiler 升级依赖.


### DotNetCore.Natasha.CSharp.Compiler _ v8.0.0.0:
- 新增 智能模式、轻便模式、自定义模式 三种编译方式.
- 新增 NatashaLoadContext 统一管理元数据.
- 支持 实现程序集、引用程序集两种预热方式.
- 支持 动态断点调试.
- 支持 引用程序集输出.
- 支持 隐藏的 Release 模式.
- 全面兼容 Standard2.0.
- 优化预热性能.
- 优化预热内存涨幅.


### DotNetCore.Natasha.CSharp.Template.Core _ v8.0.0.0:
- 全面兼容 Standard2.0.
- 为 `DotNetCore.Natasha.CSharp.Compiler` 提供 .NET Core3.1+ 脚本模板支持.


### DotNetCore.Natasha.CSharp.Extension.Codecov _ v8.0.0.0:
- 全面兼容 Standard2.0.
- 支持动态程序集的方法使用率统计


### DotNetCore.Natasha.CSharp.Extension.Ambiguity _ v8.0.0.0:
- 全面兼容 Standard2.0.
### DotNetCore.Natasha.CSharp.Extension.MethodCreator _ v8.0.0.1:
- 发布 便捷动态方法编译模板.
- 跟随其他扩展库版本号发布.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct formatting issues in the CHANGELOG:

  • Ensure headings are surrounded by blank lines.
  • Lists should be surrounded by blank lines.
  • Correct multiple consecutive blank lines.
- <!--
+<!--
- 发布日志节点案例格式如下(支持多版本发布):
+ 发布日志节点案例格式如下(支持多版本发布):
- Example:
+ Example:
- ## [5.1.0.0] - 2023-04-02
+ ## [5.1.0.0] - 2023-04-02
- ### DotNetCore.Natasha.CSharp _ v5.1.0.0:
+ ### DotNetCore.Natasha.CSharp _ v5.1.0.0:
- - Github 补充发布 Release.
+ - Github 补充发布 Release.
- ### DotNetCore.Natasha.Domain _ v5.0.0.0:
+ ### DotNetCore.Natasha.Domain _ v5.0.0.0:
- - Github 补充发布 Release.
+ - Github 补充发布 Release.
- -->
+ -->

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
## [8.1.2.1] - 2024-05-01
### DotNetCore.Natasha.CSharp.Compiler _ v8.1.2.1:
- 保留热重载相关 API.
- 升级 Roslyn 依赖.
- 修复诊断警告相关 BUG.
- 修复错别字.
### DotNetCore.Natasha.DynamicLoad.Base _ v8.0.0.0:
- INatashaDynamicLoadContextBase 接口来规范域的行为.
- INatashaDynamicLoadContextCreator 接口来规范创建域以及其他 Runtime 方法的实现.
### DotNetCore.Natasha.Domain _ v8.0.0.0:
- 优化域加载时程序集比对的逻辑.
- 相同依赖不会二次加载.
### DotNetCore.Natasha.CSharp.Template.Core _ v8.0.0.1:
- 跟随 Compiler 升级依赖.
### DotNetCore.Natasha.CSharp.Extension.Codecov _ v8.0.0.1:
- 跟随 Compiler 升级依赖.
### DotNetCore.Natasha.CSharp.Compiler.Domain _ v8.0.0.0:
- 实现 `DotNetCore.Natasha.DynamicLoad.Base` 接口,支持 Natasha 域操作.
### DotNetCore.Natasha.CSharp.Extension.Ambiguity _ v8.0.0.1:
- 跟随 Compiler 升级依赖.
### DotNetCore.Natasha.CSharp.Compiler _ v8.0.0.0:
- 新增 智能模式、轻便模式、自定义模式 三种编译方式.
- 新增 NatashaLoadContext 统一管理元数据.
- 支持 实现程序集、引用程序集两种预热方式.
- 支持 动态断点调试.
- 支持 引用程序集输出.
- 支持 隐藏的 Release 模式.
- 全面兼容 Standard2.0.
- 优化预热性能.
- 优化预热内存涨幅.
### DotNetCore.Natasha.CSharp.Template.Core _ v8.0.0.0:
- 全面兼容 Standard2.0.
-`DotNetCore.Natasha.CSharp.Compiler` 提供 .NET Core3.1+ 脚本模板支持.
### DotNetCore.Natasha.CSharp.Extension.Codecov _ v8.0.0.0:
- 全面兼容 Standard2.0.
- 支持动态程序集的方法使用率统计
### DotNetCore.Natasha.CSharp.Extension.Ambiguity _ v8.0.0.0:
- 全面兼容 Standard2.0.
### DotNetCore.Natasha.CSharp.Extension.MethodCreator _ v8.0.0.1:
- 发布 便捷动态方法编译模板.
- 跟随其他扩展库版本号发布.
## [8.1.2.1] - 2024-05-01
### DotNetCore.Natasha.CSharp.Compiler _ v8.1.2.1:
- 保留热重载相关 API.
- 升级 Roslyn 依赖.
- 修复诊断警告相关 BUG.
- 修复错别字.
### DotNetCore.Natasha.CSharp.Template.Core _ v8.0.0.1:
- 跟随 Compiler 升级依赖.
### DotNetCore.Natasha.CSharp.Extension.Codecov _ v8.0.0.1:
- 跟随 Compiler 升级依赖.
### DotNetCore.Natasha.CSharp.Extension.Ambiguity _ v8.0.0.1:
- 跟随 Compiler 升级依赖.
### DotNetCore.Natasha.CSharp.Extension.MethodCreator _ v8.0.0.1:
- 发布 便捷动态方法编译模板.
- 跟随其他扩展库版本号发布.

@NMSAzulX NMSAzulX merged commit fe02894 into dev.next Apr 30, 2024
3 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr_action 此次提交包含 [Action] 相关的改动. pr_src 此次提交包含 [源码工程] 相关的改动. pr_test 此次提交包含 [测试工程] 相关的改动.
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

1 participant